package com.sure.user.dao.model;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.Size;

import com.sure.common.anotation.PrimaryKey;

/**
 * 职工
 * 
 * @author Sure
 * 
 */
public class EmployeePO implements Serializable {
	/** 序列化ID*/
	private static final long serialVersionUID = -3804695785310717644L;
	
	public static final String TABLE_NAME = "emp";
	@PrimaryKey
	public static final String PROP_ID = "emp.empno";
	public static final String PROP_NAME = "emp.ename";
	public static final String PROP_JOB = "emp.job";
	public static final String PROP_MANAGERID = "emp.mgr";
	public static final String PROP_HIREDATE = "emp.hiredate";
	public static final String PROP_SALARY = "emp.sal";
	public static final String PROP_BENEFIT = "emp.comm";
	public static final String PROP_DEPTID = "emp.deptno";
	
	/** ID*/
	private Integer id;
	/** 姓名*/
	@Size(min=3,max=6,message="用户名长度最短3，最长6")
	private String name;
	/** 职位*/
	private String job;
	/** 经理ID*/
	private Integer managerId;
	/** 雇佣日期*/
	private Date hireDate;
	/** 薪金*/
	private Float salary;
	/** 津贴*/
	private Float benefit;
	/** 所在部门ID*/
	private Integer deptId;
	
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getJob() {
		return job;
	}
	public void setJob(String job) {
		this.job = job;
	}
	public Integer getManagerId() {
		return managerId;
	}
	public void setManagerId(Integer managerId) {
		this.managerId = managerId;
	}
	public Date getHireDate() {
		return hireDate;
	}
	public void setHireDate(Date hireDate) {
		this.hireDate = hireDate;
	}
	public Float getSalary() {
		return salary;
	}
	public void setSalary(Float salary) {
		this.salary = salary;
	}
	public Float getBenefit() {
		return benefit;
	}
	public void setBenefit(Float benefit) {
		this.benefit = benefit;
	}
	public Integer getDeptId() {
		return deptId;
	}
	public void setDeptId(Integer deptId) {
		this.deptId = deptId;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		EmployeePO other = (EmployeePO) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}
	
}
